namespace ShareMarking.Systems.Entity {
    	using System;
    	
    	
    	/// <summary>
    	/// 表名：sys_manager 主键列：id
    	/// </summary>
    	[SerializableAttribute()]
    	public partial class sys_manager : MySoft.Data.Entity {
    		
    		protected Int32 _id;
    		
    		protected Int32 _role_id;
    		
    		protected Int32? _role_type;
    		
    		protected String _user_name;
    		
    		protected String _password;
    		
    		protected String _salt;
    		
    		protected String _real_name;
    		
    		protected String _telephone;
    		
    		protected String _email;
    		
    		protected Int32? _is_lock;
    		
    		protected DateTime? _add_time;
    		
    		/// <summary>
    		/// 自增ID
    		/// </summary>
    		public Int32 id {
    			get {
    				return this._id;
    			}
    			set {
    				this.OnPropertyValueChange(_.id, _id, value);
    				this._id = value;
    			}
    		}
    		
    		/// <summary>
    		/// 角色ID
    		/// </summary>
    		public Int32 role_id {
    			get {
    				return this._role_id;
    			}
    			set {
    				this.OnPropertyValueChange(_.role_id, _role_id, value);
    				this._role_id = value;
    			}
    		}
    		
    		/// <summary>
    		/// 管理员类型1超管2系管
    		/// </summary>
    		public Int32? role_type {
    			get {
    				return this._role_type;
    			}
    			set {
    				this.OnPropertyValueChange(_.role_type, _role_type, value);
    				this._role_type = value;
    			}
    		}
    		
    		/// <summary>
    		/// 用户名
    		/// </summary>
    		public String user_name {
    			get {
    				return this._user_name;
    			}
    			set {
    				this.OnPropertyValueChange(_.user_name, _user_name, value);
    				this._user_name = value;
    			}
    		}
    		
    		/// <summary>
    		/// 登录密码
    		/// </summary>
    		public String password {
    			get {
    				return this._password;
    			}
    			set {
    				this.OnPropertyValueChange(_.password, _password, value);
    				this._password = value;
    			}
    		}
    		
    		/// <summary>
    		/// 6位随机字符串,加密用到
    		/// </summary>
    		public String salt {
    			get {
    				return this._salt;
    			}
    			set {
    				this.OnPropertyValueChange(_.salt, _salt, value);
    				this._salt = value;
    			}
    		}
    		
    		/// <summary>
    		/// 用户昵称
    		/// </summary>
    		public String real_name {
    			get {
    				return this._real_name;
    			}
    			set {
    				this.OnPropertyValueChange(_.real_name, _real_name, value);
    				this._real_name = value;
    			}
    		}
    		
    		/// <summary>
    		/// 联系电话
    		/// </summary>
    		public String telephone {
    			get {
    				return this._telephone;
    			}
    			set {
    				this.OnPropertyValueChange(_.telephone, _telephone, value);
    				this._telephone = value;
    			}
    		}
    		
    		/// <summary>
    		/// 电子邮箱
    		/// </summary>
    		public String email {
    			get {
    				return this._email;
    			}
    			set {
    				this.OnPropertyValueChange(_.email, _email, value);
    				this._email = value;
    			}
    		}
    		
    		/// <summary>
    		/// 是否锁定
    		/// </summary>
    		public Int32? is_lock {
    			get {
    				return this._is_lock;
    			}
    			set {
    				this.OnPropertyValueChange(_.is_lock, _is_lock, value);
    				this._is_lock = value;
    			}
    		}
    		
    		/// <summary>
    		/// 添加时间
    		/// </summary>
    		public DateTime? add_time {
    			get {
    				return this._add_time;
    			}
    			set {
    				this.OnPropertyValueChange(_.add_time, _add_time, value);
    				this._add_time = value;
    			}
    		}
    		
    		/// <summary>
    		/// 获取实体对应的表名
    		/// </summary>
    		protected override MySoft.Data.Table GetTable() {
    			return new MySoft.Data.Table<sys_manager>("sys_manager");
    		}
    		
    		/// <summary>
    		/// 获取实体中的标识列
    		/// </summary>
    		protected override MySoft.Data.Field GetIdentityField() {
    			return _.id;
    		}
    		
    		/// <summary>
    		/// 获取实体中的主键列
    		/// </summary>
    		protected override MySoft.Data.Field[] GetPrimaryKeyFields() {
    			return new MySoft.Data.Field[] {
    					_.id};
    		}
    		
    		/// <summary>
    		/// 获取列信息
    		/// </summary>
    		protected override MySoft.Data.Field[] GetFields() {
    			return new MySoft.Data.Field[] {
    					_.id,
    					_.role_id,
    					_.role_type,
    					_.user_name,
    					_.password,
    					_.salt,
    					_.real_name,
    					_.telephone,
    					_.email,
    					_.is_lock,
    					_.add_time};
    		}
    		
    		/// <summary>
    		/// 获取列数据
    		/// </summary>
    		protected override object[] GetValues() {
    			return new object[] {
    					this._id,
    					this._role_id,
    					this._role_type,
    					this._user_name,
    					this._password,
    					this._salt,
    					this._real_name,
    					this._telephone,
    					this._email,
    					this._is_lock,
    					this._add_time};
    		}
    		
    		/// <summary>
    		/// 给当前实体赋值
    		/// </summary>
    		protected override void SetValues(MySoft.Data.IRowReader reader) {
    			if ((false == reader.IsDBNull(_.id))) {
    				this._id = reader.GetInt32(_.id);
    			}
    			if ((false == reader.IsDBNull(_.role_id))) {
    				this._role_id = reader.GetInt32(_.role_id);
    			}
    			if ((false == reader.IsDBNull(_.role_type))) {
    				this._role_type = reader.GetInt32(_.role_type);
    			}
    			if ((false == reader.IsDBNull(_.user_name))) {
    				this._user_name = reader.GetString(_.user_name);
    			}
    			if ((false == reader.IsDBNull(_.password))) {
    				this._password = reader.GetString(_.password);
    			}
    			if ((false == reader.IsDBNull(_.salt))) {
    				this._salt = reader.GetString(_.salt);
    			}
    			if ((false == reader.IsDBNull(_.real_name))) {
    				this._real_name = reader.GetString(_.real_name);
    			}
    			if ((false == reader.IsDBNull(_.telephone))) {
    				this._telephone = reader.GetString(_.telephone);
    			}
    			if ((false == reader.IsDBNull(_.email))) {
    				this._email = reader.GetString(_.email);
    			}
    			if ((false == reader.IsDBNull(_.is_lock))) {
    				this._is_lock = reader.GetInt32(_.is_lock);
    			}
    			if ((false == reader.IsDBNull(_.add_time))) {
    				this._add_time = reader.GetDateTime(_.add_time);
    			}
    		}
    		
    		public override int GetHashCode() {
    			return base.GetHashCode();
    		}
    		
    		public override bool Equals(object obj) {
    			if ((obj == null)) {
    				return false;
    			}
    			if ((false == typeof(sys_manager).IsAssignableFrom(obj.GetType()))) {
    				return false;
    			}
    			if ((((object)(this)) == ((object)(obj)))) {
    				return true;
    			}
    			return false;
    		}
    		
    		public class _ {
    			
    			/// <summary>
    			/// 表示选择所有列，与*等同
    			/// </summary>
    			public static MySoft.Data.AllField All = new MySoft.Data.AllField<sys_manager>();
    			
    			/// <summary>
    			/// 自增ID - 字段名：id - 数据类型：Int32
    			/// </summary>
    			public static MySoft.Data.Field id = new MySoft.Data.Field<sys_manager>("id");
    			
    			/// <summary>
    			/// 角色ID - 字段名：role_id - 数据类型：Int32
    			/// </summary>
    			public static MySoft.Data.Field role_id = new MySoft.Data.Field<sys_manager>("role_id");
    			
    			/// <summary>
    			/// 管理员类型1超管2系管 - 字段名：role_type - 数据类型：Int32(可空)
    			/// </summary>
    			public static MySoft.Data.Field role_type = new MySoft.Data.Field<sys_manager>("role_type");
    			
    			/// <summary>
    			/// 用户名 - 字段名：user_name - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field user_name = new MySoft.Data.Field<sys_manager>("user_name");
    			
    			/// <summary>
    			/// 登录密码 - 字段名：password - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field password = new MySoft.Data.Field<sys_manager>("password");
    			
    			/// <summary>
    			/// 6位随机字符串,加密用到 - 字段名：salt - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field salt = new MySoft.Data.Field<sys_manager>("salt");
    			
    			/// <summary>
    			/// 用户昵称 - 字段名：real_name - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field real_name = new MySoft.Data.Field<sys_manager>("real_name");
    			
    			/// <summary>
    			/// 联系电话 - 字段名：telephone - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field telephone = new MySoft.Data.Field<sys_manager>("telephone");
    			
    			/// <summary>
    			/// 电子邮箱 - 字段名：email - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field email = new MySoft.Data.Field<sys_manager>("email");
    			
    			/// <summary>
    			/// 是否锁定 - 字段名：is_lock - 数据类型：Int32(可空)
    			/// </summary>
    			public static MySoft.Data.Field is_lock = new MySoft.Data.Field<sys_manager>("is_lock");
    			
    			/// <summary>
    			/// 添加时间 - 字段名：add_time - 数据类型：DateTime(可空)
    			/// </summary>
    			public static MySoft.Data.Field add_time = new MySoft.Data.Field<sys_manager>("add_time");
    		}
    	}
    }
    